import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lcapp/config/const_config.dart';
import 'package:lcapp/widget/asr_app_bar.dart';
import 'package:lcapp/widget/custom_tabs.dart';

class MinOrdersPage extends StatefulWidget {
  const MinOrdersPage({Key? key}) : super(key: key);

  @override
  _MinOrdersPageState createState() => _MinOrdersPageState();
}

class _MinOrdersPageState extends State<MinOrdersPage> with SingleTickerProviderStateMixin {

  late TabController _tabController;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _tabController = TabController(length: 5, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: bgColor,
      appBar: AsrAppBar(
        backgroundColor: bgColor,
        titleText: '我的订单',
      ),
      body: Container(
        padding: EdgeInsets.symmetric(horizontal: 30.w),
        child: Column(
          children: [
            Container(
              child: TabBar(
                controller: _tabController,
                indicatorColor: Colors.transparent,
                indicatorPadding: EdgeInsets.zero,
                unselectedLabelColor: Color(0xff1A051D),
                unselectedLabelStyle: TextStyle(
                  fontSize: 30.sp,
                  color: Colors.black,
                ),
                indicatorSize: TabBarIndicatorSize.label,
                labelColor: Color(0xffFF6D00),
                labelStyle: TextStyle(
                  fontSize: 36.sp,
                  color: Color(0xffFF6D00),
                  fontWeight: FontWeight.w600,
                ),
                tabs: const [
                  Text("全部"),
                  Text("待付款"),
                  Text("待收货"),
                  Text("已付款"),
                  Text("已取消"),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
